import 'package:get/get.dart';
import 'package:seedfour/app/routes/app_routes.dart';
import 'package:seedfour/app/views/module_case/case_create/logic.dart';
import 'package:seedfour/app/services/common_service.dart';

import '../../../constants.dart';
import '../../web_screen/screen_params.dart';

class MainDiscoverLogic extends GetxController {
  double cardWidth = (Get.width - kSpaceSmall * 3) / 2;
  final commonService = Get.put(CommonService());

  void toSeal() {
    Get.toNamed(RouteGet.sealList);
  }

  void toOrderIncome() {
    Get.toNamed(RouteGet.incomeOrderList);
  }

  void toOrderPaid() {
    Get.toNamed(RouteGet.paidOrderList);
  }

  void toCase() {
    Get.toNamed(RouteGet.caseList);
  }

  void toNotice() {
    Get.toNamed(RouteGet.noticeList);
  }

  void toCaseQuery() {
    Get.toNamed(RouteGet.caseCreate, arguments: CaseCreatePageType.query);
  }

  void toFolderList() {
    Get.toNamed(RouteGet.folderList);
  }
  void toMeetingRoomPage() {
    String? token = commonService.getToken();
    String orgId = commonService.getUser().targetSite!.owner;
    String url =
        'https://www.seedfour.com/clicms/#/shifu-meeting?orgId=$orgId&token=$token';
    Get.toNamed(RouteGet.webScreen, arguments: WebScreenParams(url: url));
  }
  void toAIPage() {
    String? token = commonService.getToken();
    String orgId = commonService.getUser().targetSite!.owner;
    String url =
        'https://www.seedfour.com/clicms/#/shifu-ai?orgId=$orgId&token=$token';
    Get.toNamed(RouteGet.webScreen, arguments: WebScreenParams(url: url));
  }
  void toWeiKe() {
    Get.toNamed(RouteGet.webScreen,
        arguments: WebScreenParams(
          url:
              'https://api.seedfour.com/cmsapi/api/v1/clicms/legalsearch/wkinfo?client=mobile',
        ));
  }

  void toCompany() {
    Get.toNamed(RouteGet.webScreen,
        arguments: WebScreenParams(
          url:
              'https://api.seedfour.com/cmsapi/api/v1/clicms/legalsearch/wkinfo?client=mobile-qiyequery',
        ));
  }

  void toComputer() {
    Get.toNamed(RouteGet.webScreen,
        arguments: WebScreenParams(
          url:
              'https://api.seedfour.com/cmsapi/api/v1/clicms/legalsearch/wkinfo?client=mobile-computor',
        ));
  }
}
